// Copyright (c) 2008, 
// Marc Speck, http://www.faindu.com
// All Rights Reserved. The following is Source Code and is subject to all restrictions 
// on such code as contained in the license accompanying this product.
package com.faindu.editImage.base
{
	import flash.display.Bitmap;
	import flash.geom.Matrix;
	import flash.geom.Transform;
	
	import mx.core.FlexSprite;
	
/**
 * Interface for all tools referencing <code>EditImage</code>.
 */
public interface IEditImageTools
{
	/**
	 * The transform matrix that is applied to <code>imageHolder</code> after every interaction 
	 * and at the end of the interaction. This is not a clone, so be carefull with 
	 * referencing the matrix.
	 * 
	 * @see com.faindu.editImage.EditImage#interactionHandler()
	 * @see com.faindu.editImage.EditImage#endInteractionHandler()
	 */
	function get toolMatrix(): Matrix 
	function set toolMatrix( value:Matrix ): void 
	
	/**
	 * This holds the image bitmap and all transformations are applied to 
	 * <code>imageHolder</code>.
	 */
	function get imageHolder(): FlexSprite
	function set imageHolder( value:FlexSprite ): void
	
	/**
	 * Update all tools. If the tool is enabled, add it to the display list,
	 * otherwise remove it. 
	 */
	function updateToolsEnabled():void
	
	/**
	 * Stores the possible positions for controls. All points are in the inner coordinate
	 * system.
	 */
	function get controlsPositions(): ControlsPositions
	
	/**
	 * This is the bitmap of the image. Bitmap also allows access
	 * to the original <code>BitmapData</code>.
	 */
	function get image(): Bitmap

	/**
	 * Only used in rotateTool. //TODO: factor out
	 */
	function get transform(): Transform
}
}